{% load staticfiles %}
<header class="top-head container-fluid">
                <button type="button" class="navbar-toggle pull-left">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                
                <!-- Search -->
                <form role="search" class="navbar-left app-search pull-left hidden-xs">
                  <input type="text" placeholder="Search..." class="form-control">
                  <a href=""><i class="fa fa-search"></i></a>
                </form>
                
                <!-- Left navbar -->
                <nav class=" navbar-default" role="navigation">
                    <ul class="nav navbar-nav hidden-xs">
                        <li class="dropdown">
                          <a data-toggle="dropdown" class="dropdown-toggle" href="#">共享数据<span class="caret"></span></a>
                            <ul role="menu" class="dropdown-menu">
                                <li><a href="{% url 'dashboard' %}">公共主页</a></li>
                                <li><a href="{% url 'products' %}">产品推荐</a></li>
                                <li><a href="{% url 'analysis' %}">数据分析 <sup>beta</sup></a></li>
                            </ul>
                        </li>
                        <li class="dropdown">
                          <a data-toggle="dropdown" class="dropdown-toggle" href="{% url 'logistics' %}">物流监控 <span class="caret"></span></a>
                            <ul role="menu" class="dropdown-menu">
                                <li><a href="{% url 'logistics' %}">物流跟踪</a></li>
                                <li><a href="{% url 'logistics_list' %}">90天物流</a></li>
                                <li><a href="{% url 'logistics_import' %}">导入物流</a></li>
                                <li><a href="{% url 'logistics_settings' %}">调控设置</a></li>
                            </ul>
                        </li>
                        <li class="dropdown">
                          <a data-toggle="dropdown" class="dropdown-toggle" href="#">店铺监控 <span class="caret"></span></a>
                            <ul role="menu" class="dropdown-menu">
                                <li><a href="{% url 'myStore' %}">我的店铺 <sup>beta</sup></a></li>
                                <li><a href="{% url 'monitorStore' %}">竞争店铺 <sup>beta</sup></a></li>
                                <li><a href="{% url 'monitorStoreNew' %}">新品跟踪 <sup>beta</sup></a></li>
                                <li><a href="{% url 'monitorStoreHot' %}">热销产品 <sup>beta</sup></a></li>
                            </ul>
                        </li>
                        <li class="dropdown">
                          <a data-toggle="dropdown" class="dropdown-toggle" href="#">我的产品 <span class="caret"></span></a>
                            <ul role="menu" class="dropdown-menu">
                                <li><a href="{% url 'favorite' %}">产品收藏夹</a></li>
                                <li><a href="{% url 'monitor_products' %}">监控产品 <sup>beta</sup></a></li>
                                <li><a href="{% url 'myProducts' %}">产品跟踪</a></li>

                            </ul>
                        </li>
                        <li class="">
                            <button class="btn btn-success btn-rounded m-t-15" data-toggle="modal" data-target="#tabs-modal">增加采集任务</button>
                        </li>
                    </ul>

                    <!-- Right navbar -->
                    <ul class="nav navbar-nav navbar-right top-menu top-right-menu">  
                        <!-- mesages -->  
                        <li class="dropdown">
                            <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <i class="zmdi zmdi-email-open"></i>
                                <span class="badge badge-sm up bg-purple count" id="mail-count">{{ unread_mail }}</span>
                            </a>
                            <ul class="dropdown-menu extended fadeInUp animated nicescroll" tabindex="5001">
                                <li>
                                    <p>消息 <sup>beta</sup></p>
                                </li>
                                <div id="message">

                                </div>
                                {% if unread_messages %}
                                    {% for m in unread_messages %}
                                        <li>
                                    <a href="{% url 'readMail' m.id %}">
                                        <span class="pull-left"><img src="{% static '' %}velonic/img/avatar-2.jpg" class="img-circle thumb-sm m-r-15" alt="img"></span>
                                        <span class="block"><strong>Admin</strong></span>
                                        <span class="media-body block">{{ m.title }}<br><small class="text-muted">{{ m.send_time }}</small></span>
                                    </a>
                                </li>
                                    {% endfor %}
                                {% endif %}

                                <li>
                                    <p><a href="{% url 'mailBox' %}" class="text-right">查看全部消息</a></p>
                                </li>
                            </ul>
                        </li>
                        <!-- /messages -->
                        <!-- Notification -->
                        <li class="dropdown">
                            <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <i class="zmdi zmdi-notifications-none"></i>
                                <span class="badge badge-sm up bg-pink count" id="notice-count">{{ unread_num }}</span>
                            </a>
                            <ul class="dropdown-menu extended fadeInUp animated nicescroll" tabindex="5002">
                                <li class="noti-header">
                                    <p>通知 <sup>beta</sup></p>
                                </li>
                                <div id="notice">
                                    {% if unread_notice %}
                                        {% for n in unread_notice %}
                                            <li>
                                    <a href="#" class="noticeDetail" note-id="{{ n.id }}" data-toggle="modal" data-target="#readNoticeModal">
                                        <span class="pull-left"><i class="fa fa-bell-o fa-2x text-info"></i></span>
                                        <span>{{ n.title }}<br><small class="text-muted">{{ n.send_time }}</small></span>
                                    </a>
                                </li>
                                        {% endfor %}

                                    {% endif %}
                                </div>
                                <li>
                                    <p><a href="#" class="text-right">查看全部通知</a></p>
                                </li>
                            </ul>
                        </li>
                        <!-- /Notification -->

                        <!-- user login dropdown start-->
                        <li class="dropdown text-center">
                            <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                {% if user_profile.avatar %}
                                <img alt="" src="/uploads/{{ user_profile.avatar }}" class="img-circle profile-img thumb-sm">
                                    {% else %}
                                    <img alt="" src="{% static '' %}velonic/img/avatar-2.jpg" class="img-circle profile-img thumb-sm">
                                {% endif %}
                                <span class="username">{% if user_profile.name %}{{ user_profile.name }}{% else %}{{ request.user.username }}{% endif %} </span> <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu pro-menu fadeInUp animated" tabindex="5003" style="overflow: hidden; outline: none;">
                                <li><a href="{% url 'profile' %}#aboutme"><i class="fa fa-briefcase"></i>个人资料</a></li>
                                <li><a href="{% url 'changePassword' %}"><i class="fa fa-cog"></i> 修改密码</a></li>
                                <li><a href="{% url 'profile' %}#projects"><i class="fa fa-bell"></i> 任务管理 <span class="label label-info pull-right mail-info">5</span></a></li>
                                <li><a href="{% url 'signout' %}"><i class="fa fa-sign-out"></i> 退出</a></li>
                            </ul>
                        </li>
                        <!-- user login dropdown end -->       
                    </ul>
                    <!-- End right navbar -->
                </nav>
                
            </header>

